<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- testcpp.cpp -->
  <meta name="description" content="A class in a namespace.">
  <title>Test Class | TestCPP</title>
</head>
<body>
<li><a href="testcpp-module.html" translate="no">C++ Classes</a></li>
<li>Test</li>
<div class="sidebar">
<div class="toc">
<h3 id="toc">Contents</h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#macros">Macros</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title" translate="no">Test Class</h1>
<span class="small-subtitle" translate="no">class <a href="testqdoc.html" translate="no">TestQDoc</a>::Test</span>
<!-- $$$Test-brief -->
<p>A class in a namespace. <a href="#details">More...</a></p>
<!-- @@@Test -->
<div class="table"><table class="alignedsummary requisites" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <code translate="no">#include &lt;Test&gt;</code></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> <code translate="no">find_package(Qt6 REQUIRED COMPONENTS QDocTest)</code><br/>
<code translate="no">target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</code></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> <code translate="no">QT += testcpp</code></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 2.0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="testqdoc-testderived.html" translate="no">TestQDoc::TestDerived</a></p>
</td></tr>
</table></div>
<ul>
<li><a href="testqdoc-test-members.html">List of all members, including inherited members</a></li>
<li><a href="testqdoc-test-obsolete.html">Deprecated members</a></li>
<li>Test is part of <a href="cpptypes.html">Test C++ Types</a>.</li>
</ul>
<p><b>Note:</b> All functions in this class are <a href="https://doc.qt.io/qt/17-qdoc-commands-thread.html#reentrant-command">reentrant</a> with the following exceptions:</p>
<ul>
<li><a href="testqdoc-test.html#someFunctionDefaultArg" translate="no">someFunctionDefaultArg</a>(int i, bool b) const</li>
</ul>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#SomeType-typedef" translate="no">SomeType</a></b></td></tr>
</table></div>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#Test" translate="no">Test</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void (*)(bool) </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#funcPtr" translate="no">funcPtr</a></b>(bool <i>b</i>, const char *<i>s</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#inlineFunction" translate="no">inlineFunction</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#methodWithEmDashInItsDocs" translate="no">methodWithEmDashInItsDocs</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#methodWithEnDashInItsDocs" translate="no">methodWithEnDashInItsDocs</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#someFunction" translate="no">someFunction</a></b>(int, int <i>v</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#someFunctionDefaultArg" translate="no">someFunctionDefaultArg</a></b>(int <i>i</i>, bool <i>b</i> = false) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#virtualFun" translate="no">virtualFun</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> TestQDoc::Test &amp;</td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#operator-eq" translate="no">operator=</a></b>(TestQDoc::Test &amp;&amp;<i>other</i>)</td></tr>
</table></div>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#overload" translate="no">overload</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> <code class="summary extra" translate="no">(since Test 1.2)</code> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#overload-1" translate="no">overload</a></b>(bool <i>b</i>)</td></tr>
</table></div>
<h2 id="related-non-members">Related Non-Members</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#operator-eq-eq" translate="no">operator==</a></b>(const TestQDoc::Test &amp;<i>lhs</i>, const TestQDoc::Test &amp;<i>rhs</i>)</td></tr>
</table></div>
<h2 id="macros">Macros</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> <code class="summary extra" translate="no">(since Test 1.1)</code> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#QDOCTEST_MACRO2" translate="no">QDOCTEST_MACRO2</a></b>(int &amp;<i>x</i>)</td></tr>
</table></div>
<!-- $$$Test-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
</div>
<!-- @@@Test -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$SomeType -->
<h3 class="fn" translate="no" id="SomeType-typedef">Test::<span class="name">SomeType</span></h3>
<p>A typedef.</p>
<!-- @@@SomeType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$ -->
<div class="fngroup">
<h3 class="fn fngroupitem" translate="no" id="overload"><code class="details extra" translate="no">[protected]</code> <span class="type">void</span> Test::<span class="name">overload</span>()</h3><h3 class="fn fngroupitem" translate="no" id="overload-1"><code class="details extra" translate="no">[protected, since Test 1.2]</code> <span class="type">void</span> Test::<span class="name">overload</span>(<span class="type">bool</span> <i>b</i>)</h3></div>
<p>Overloads that share a documentation comment, optionally taking a parameter <i translate="no">b</i>.</p>
<!-- @@@ -->
<!-- $$$Test[overload1]$$$Test -->
<h3 class="fn" translate="no" id="Test">Test::<span class="name">Test</span>()</h3>
<p>The default constructor is deleted.</p>
<!-- @@@Test -->
<!-- $$$funcPtr[overload1]$$$funcPtrboolconstchar* -->
<h3 class="fn" translate="no" id="funcPtr"><span class="type">void</span> (*)(<span class="type">bool</span>) Test::<span class="name">funcPtr</span>(<span class="type">bool</span> <i>b</i>, const <span class="type">char</span> *<i>s</i>)</h3>
<p>Returns a pointer to a function that takes a boolean. Uses <i translate="no">b</i> and <i translate="no">s</i>.</p>
<!-- @@@funcPtr -->
<!-- $$$inlineFunction[overload1]$$$inlineFunction -->
<h3 class="fn" translate="no" id="inlineFunction"><span class="type">void</span> Test::<span class="name">inlineFunction</span>()</h3>
<p>An inline function, documented using the \fn QDoc command.</p>
<!-- @@@inlineFunction -->
<!-- $$$methodWithEmDashInItsDocs[overload1]$$$methodWithEmDashInItsDocs -->
<h3 class="fn" translate="no" id="methodWithEmDashInItsDocs"><span class="type">void</span> Test::<span class="name">methodWithEmDashInItsDocs</span>()</h3>
<p>This method has em dashes in its documentation&mdash;as you'll find represented by <code translate="no">---</code> in the sources&mdash;here and there. The important bit to note is that when passed e.g. to the \c command, the three hyphens are processed as input to the command and not replaced by an em dash.</p>
<p>-----------------------------------------------------------------------</p>
<p>People can still add a bunch of dashes, though, without QDoc replacing them all with a series of em dashes.</p>
<p>&mdash;You can also start a new paragraph with an em dash, if you want to.</p>
<p><b>See also </b><a href="testqdoc-test.html#methodWithEnDashInItsDocs" translate="no">methodWithEnDashInItsDocs</a>.</p>
<!-- @@@methodWithEmDashInItsDocs -->
<!-- $$$methodWithEnDashInItsDocs[overload1]$$$methodWithEnDashInItsDocs -->
<h3 class="fn" translate="no" id="methodWithEnDashInItsDocs"><span class="type">void</span> Test::<span class="name">methodWithEnDashInItsDocs</span>()</h3>
<p>This method has en dashes in its documentation &ndash; as you'll find represented by <code translate="no">--</code> in the sources &ndash; here and there. The important bit to note is that when passed e.g. to the \c command, the two hyphens are processed as input to the command and not replaced by an en dash. This also applies to code blocks, where otherwise, the decrement operator would get completely borked:</p>
<pre class="cpp" translate="no"><span class="keyword">for</span> (<span class="type">int</span> i <span class="operator">=</span> <span class="number">42</span>; i <span class="operator">&gt;</span> <span class="number">0</span>; <span class="operator">-</span><span class="operator">-</span>i)
    <span class="comment">// Do something cool during countdown.</span></pre>
<p>...as it would be silly if this would output &ndash;i instead of <code translate="no">--i</code>.</p>
<p>-----------------------------------------------------------------------</p>
<p>It still allows people to add a bunch of dashes, though, without replacing them all with a series of en dashes. Of course, they might want to use the \hr command instead, like this:</p>
<hr />
<p>&ndash; You can also start a new paragraph with an en dash, if you want to.</p>
<p><b>See also </b>methodWithEnDashInItsDocs.</p>
<!-- @@@methodWithEnDashInItsDocs -->
<!-- $$$someFunction[overload1]$$$someFunctionintint -->
<h3 class="fn" translate="no" id="someFunction"><span class="type">int</span> Test::<span class="name">someFunction</span>(<span class="type">int</span>, <span class="type">int</span> <i>v</i> = 0)</h3>
<p>Function that takes a parameter <i translate="no">v</i>. Also returns the value of <i translate="no">v</i>.</p>
<!-- @@@someFunction -->
<!-- $$$someFunctionDefaultArg[overload1]$$$someFunctionDefaultArgintbool -->
<h3 class="fn" translate="no" id="someFunctionDefaultArg"><span class="type">void</span> Test::<span class="name">someFunctionDefaultArg</span>(<span class="type">int</span> <i>i</i>, <span class="type">bool</span> <i>b</i> = false) const</h3>
<p>Function that takes a parameter <i translate="no">i</i> and <i translate="no">b</i>.</p>
<p><b>Warning:</b> This function is not <a href="https://doc.qt.io/qt/17-qdoc-commands-thread.html#reentrant-command">reentrant</a>.</p>
<!-- @@@someFunctionDefaultArg -->
<!-- $$$virtualFun[overload1]$$$virtualFun -->
<h3 class="fn" translate="no" id="virtualFun"><code class="details extra" translate="no">[virtual]</code> <span class="type">void</span> Test::<span class="name">virtualFun</span>()</h3>
<p>Function that must be reimplemented.</p>
<!-- @@@virtualFun -->
<!-- $$$operator=[overload1]$$$operator=TestQDoc::Test&& -->
<h3 class="fn" translate="no" id="operator-eq"><span class="type"><a href="testqdoc-test.html" translate="no">TestQDoc::Test</a></span> &amp;Test::<span class="name">operator=</span>(<span class="type"><a href="testqdoc-test.html" translate="no">TestQDoc::Test</a></span> &amp;&amp;<i>other</i>)</h3>
<p>The move assignment operator is deleted. <i translate="no">other</i> cannot be moved from.</p>
<!-- @@@operator= -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$operator==[overload1]$$$operator==constTestQDoc::Test&constTestQDoc::Test& -->
<h3 class="fn" translate="no" id="operator-eq-eq"><span class="type">bool</span> <span class="name">operator==</span>(const <span class="type"><a href="testqdoc-test.html" translate="no">TestQDoc::Test</a></span> &amp;<i>lhs</i>, const <span class="type"><a href="testqdoc-test.html" translate="no">TestQDoc::Test</a></span> &amp;<i>rhs</i>)</h3>
<p>Returns true if <i translate="no">lhs</i> and <i translate="no">rhs</i> are equal.</p>
<!-- @@@operator== -->
</div>
<div class="macros">
<h2>Macro Documentation</h2>
<!-- $$$QDOCTEST_MACRO2[overload1]$$$QDOCTEST_MACRO2int& -->
<h3 class="fn" translate="no" id="QDOCTEST_MACRO2"><code class="details extra" translate="no">[since Test 1.1]</code> <span class="name">QDOCTEST_MACRO2</span>(<span class="type">int</span> &amp;<i>x</i>)</h3>
<p>A macro with argument <i translate="no">x</i>.</p>
<p>This macro was introduced in Test 1.1.</p>
<!-- @@@QDOCTEST_MACRO2 -->
</div>
</body>
</html>
